<?php

namespace App\Http\Controllers\admin;

use App\Dao\BillDao;
use App\Exceptions\SysExceptions;
use App\Services\Code;

class BillController extends BaseController
{

    public function lists_tixian(){
        if(getIsHasPage()){
            return Code::message('',200,BillDao::get_bills_page(array_merge(request()->all(),[
                'type'=>3
            ])));
        }
        return  view('admin.bill.bill_tixian');
    }


    /**
     * @throws SysExceptions
     */
    public function audit()
    {
        if(isPost()){
            $params = request()->all();
            BillDao::audit($params);
            return Code::message('',200);
        }
        $info = BillDao::get_one(request()->all());
        return  view('admin.bill.audit',[
            'info'=>$info
        ]);
    }
}
